import request from '@/utils/request'

// 查询楼栋列表
export function listBuidings(query) {
  return request({
    url: '/college/buidings/list',
    method: 'get',
    params: query
  })
}

// 查询楼栋详细
export function getBuidings(buildingId) {
  return request({
    url: '/college/buidings/' + buildingId,
    method: 'get'
  })
}

// 新增楼栋
export function addBuidings(data) {
  return request({
    url: '/college/buidings',
    method: 'post',
    data: data
  })
}

// 修改楼栋
export function updateBuidings(data) {
  return request({
    url: '/college/buidings',
    method: 'put',
    data: data
  })
}

// 删除楼栋
export function delBuidings(buildingId) {
  return request({
    url: '/college/buidings/' + buildingId,
    method: 'delete'
  })
}

// 导出楼栋
export function exportBuidings(query) {
  return request({
    url: '/college/buidings/export',
    method: 'get',
    params: query
  })
}